package com.hspedu.mhl.service;

import com.hspedu.mhl.dao.AthleteDao;
import com.hspedu.mhl.domain.Athlete;

public class AthleteService {
    //通过调用AthleteDao来对数据库中表进行操作
    private AthleteDao dao = new AthleteDao();
    public Athlete getAthleteByIdAndPwd(String World_Ranking, String pwd) {
        //根据泛型的的定义需要把T传进来
        return dao.querySingle("select *from athlete where World_Ranking=? and pwd=md5(?)",
                Athlete.class, World_Ranking, pwd);
    }
}
